package com.martin.fastframe.ui.ceiling

import android.view.View
import com.martin.fastframe.R
import com.martin.fastframe.databinding.ItemCeilingTitleBinding
import com.martin.lib_base.annotation.ItemData
import com.martin.lib_base.base.BaseViewHolder
import com.martin.lib_base.bean.CeilingBean
import com.martin.lib_base.interfaces.IItemData
import com.martin.lib_base.interfaces.ITypeBean

@ItemData(CeilingViewHolder.Companion.ItemData::class)
class CeilingViewHolder(view: View) : BaseViewHolder<CeilingBean, ItemCeilingTitleBinding>(view) {

    override fun onBindViewHolder(position: Int, item: Any?) {
        binding.tv.text = getItemBean(item)!!.title
    }

    companion object {
        class ItemData : IItemData {
            override fun getItemType(): Int {
                return ITypeBean.ITEM_TYPE_CEILING
            }

            override fun getItemLayoutId(): Int {
                return R.layout.item_ceiling_title
            }
        }
    }

}